Change in openvpn[master]: sitnl: use RTM_SETLINK for updating existing interfaces
A message that is not in the archive (sent off-list or not yet received): gerrit.1776267299000.I33e55d88d561393ebfbc73a995f700056e19a436@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1628?usp=email
to review the following change.
Change subject: sitnl: use RTM_SETLINK for updating existing interfaces
......................................................................
sitnl: use RTM_SETLINK for updating existing interfaces
RTM_NEWLINK is primarily intended for link creation and initialization, while RTM_SETLINK is the canonical interface for modifying attributes of an already existing link.
Even though the kernel may accept RTM_NEWLINK for updates, using RTM_SETLINK better reflects the intended netlink semantics and follows the dedicated update path in the kernel.
This makes the behavior more explicit and consistent with how link configuration changes are expected to be performed.
---
M src/openvpn/networking_sitnl.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/28/1628/1
src/openvpn/networking_sitnl.c +3 -3
@@ -671,7 +671,7 @@ req.n.nlmsg_len =NLMSG_LENGTH (sizeof (req.i)); req.n.nlmsg_flags =NLM_F_REQUEST ; - req.n.nlmsg_type =RTM_NEWLINK ; + req.n.nlmsg_type =RTM_SETLINK ; req.i.ifi_family =AF_PACKET ; req.i.ifi_index = ifindex;
@@ -707,7 +707,7 @@ req.n.nlmsg_len =NLMSG_LENGTH (sizeof (req.i)); req.n.nlmsg_flags =NLM_F_REQUEST ; - req.n.nlmsg_type =RTM_NEWLINK ; + req.n.nlmsg_type =RTM_SETLINK ; req.i.ifi_family =AF_PACKET ; req.i.ifi_index = ifindex;
@@ -738,7 +738,7 @@ req.n.nlmsg_len =NLMSG_LENGTH (sizeof (req.i)); req.n.nlmsg_flags =NLM_F_REQUEST ; - req.n.nlmsg_type =RTM_NEWLINK ; + req.n.nlmsg_type =RTM_SETLINK ; req.i.ifi_family =AF_PACKET ; req.i.ifi_index = ifindex;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1628?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I33e55d88d561393ebfbc73a995f700056e19a436
Gerrit-Change-Number: 1628
Gerrit-PatchSet: 1
Gerrit-Owner: its_Giaan <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>